Skip to content

add runtime type for wrapped records#23

Merged
bentsku merged 2 commits intomainfrom
fix-union-runtime-wraped
Feb 25, 2026
Merged

add runtime type for wrapped records#23
bentsku merged 2 commits intomainfrom
fix-union-runtime-wraped

Conversation

@bentsku
Copy link
Copy Markdown

@bentsku bentsku commented Feb 24, 2026

While using the new wrapped records, I fell upon the following case : field: str | list[str]. Because we now wrapped such list in records, we need to add the Runtime Type to make sure we can serialize this type properly, and deserialize it back (understand it is a wrapped record when reading it)

This adds it to the schema so the serde logic can make use of it 👍

note: the weird order is because of this linting issue: https://github.com/localstack/py-avro-schema/actions/runs/22366726525/job/64734602358

Not sure if we need to configure mypy to be less strict, but it wouldn't let me call append on the fields value of the dict 🤷

Copy link
Copy Markdown
Member

@giograno giograno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks for catching this! 💯

@bentsku bentsku merged commit 469d815 into main Feb 25, 2026
6 checks passed
@bentsku bentsku deleted the fix-union-runtime-wraped branch February 25, 2026 09:27
bentsku added a commit that referenced this pull request Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants